//
//  Brandlist.m
//  __PRODUCTNAME__
//
//  Created by QC.L on 16/08/10
//  Copyright (c) __ORGANIZATIONNAME__. All rights reserved.
//

#import "Brandlist.h"
#import "Brand.h"

@implementation Brandlist
- (void)setValue:(id)value forKey:(NSString *)key{
    [super setValue:value forKey:key];
    if ([key isEqualToString:@"list"]) {
        NSMutableArray<Brand *> *brandArray = [NSMutableArray array];
        for (NSDictionary *brandDic in value) {
            Brand *brand = [Brand modelWithDictionary:brandDic];
            [brandArray addObject:brand];
        }
        _list = brandArray;
    }
}
+ (NSDictionary *)objectClassInArray{
    return @{@"list" : [Brand class]};
}

@end
